package com.haihui.platform.service.impl.sys;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.haihui.platform.dao.sys.SysAdUserDao;
import com.haihui.platform.entity.DustBaseModel;
import com.haihui.platform.entity.Role;
import com.haihui.platform.entity.SysAdUserInfo;
import com.haihui.platform.service.sys.SysAdUserService;

@Service
public class SysAdUserServiceImpl implements SysAdUserService{

	@Autowired
	private SysAdUserDao sysAdUserDao;
	
	//获取用户信息列表
	@Override
	public List<SysAdUserInfo> list(SysAdUserInfo user) {
		return sysAdUserDao.list(user);
	}
   
	//添加用户
	@Override
	public Integer add(SysAdUserInfo user) {
		return sysAdUserDao.add(user);
	}

	//登陆
	@Override
	public SysAdUserInfo login(SysAdUserInfo user) {
		return sysAdUserDao.login(user);
	}
	
	//获取数据条数
	@Override
	 public int getUserCount(SysAdUserInfo user)
	 {
		 return sysAdUserDao.getUserCount(user);
	 }
	
	 /**
     * 查询用户详细信息
     * @param model
     * @return
     */
	@Override
    public SysAdUserInfo detail(SysAdUserInfo model){return sysAdUserDao.detail(model);}
    
	//判断用户名是否重复
    @Override
	 public int getUserByName(SysAdUserInfo user)
	 {
		 return sysAdUserDao.getUserByName(user);
	 }
    
    //更新用户信息
    @Override
	 public int updateUser(SysAdUserInfo user)
	 {
		 return sysAdUserDao.updateUser(user);
	 }
    
    //删除用户信息
    @Override
	 public int deleteUser(SysAdUserInfo user)
	 {
		 return sysAdUserDao.deleteUser(user);
	 }
    
    
  //删除用户信息
    @Override
	 public List<Role> sysUserRoleList()
	 {
		 return sysAdUserDao.sysUserRoleList();
	 }
    
  //删除用户信息
    @Override
	 public List<DustBaseModel> sysUserDustList()
	 {
		 return sysAdUserDao.sysUserDustList();
	 }
	

}
